package com.jinghua.treatment.service.impl;

import com.jinghua.treatment.entity.SysInquiry;
import com.jinghua.treatment.mapper.SysInquirysMapper;
import com.jinghua.treatment.service.SysInquiryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 王兴光 on 2018/3/30.
 */
@Service("inquiryService")
public class SysInquiryServiceImpl implements SysInquiryService {
    @Resource
    private SysInquirysMapper inquirysMapper;

    @Override
    @Transactional
    public int insert(SysInquiry record) {
        return inquirysMapper.insert(record);
    }

    @Override
    public SysInquiry selectByPrimaryKey(Integer inquiryId) {
        return inquirysMapper.selectByPrimaryKey(inquiryId);
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(SysInquiry record) {
        return inquirysMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysInquiry> selectByDoctorId(Integer doctorId) {
        return inquirysMapper.selectByDoctorId(doctorId);
    }
}
